﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ClassCode.aspx.cs" Inherits="Timesheet.WebForm.Setting.ClassCode" %>

<%@ Register Assembly="DevExpress.Web.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <div class="title">
        <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Class Code" CssClass="maintitle" Font-Size="22px" Font-Bold="true" ForeColor="#4A72A3"></dx:ASPxLabel>

    </div>
    <div class="detail1">
        <div style="float: left">
            <dx:ASPxGridView
                ID="grvClassCode"
                runat="server"
                EnableTheming="True"
                Theme="Office2010Silver"
                SettingsPager-PageSize="15"
                Width="500px"
                DataSourceID="dsClassCodes"
                AutoGenerateColumns="False"
                KeyFieldName="Id">
                <Columns>
                    <dx:GridViewDataTextColumn FieldName="Id" VisibleIndex="0" ReadOnly="true" Visible="false">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="Name" Caption="Name" VisibleIndex="1">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataCheckColumn FieldName="Active" VisibleIndex="3" Width="80px">
                    </dx:GridViewDataCheckColumn>
                    <dx:GridViewCommandColumn Caption="Action" VisibleIndex="4" Width="130px" ShowEditButton="true" ShowNewButtonInHeader="true">
                    </dx:GridViewCommandColumn>

                </Columns>

                <SettingsBehavior ColumnResizeMode="Disabled" ConfirmDelete="true" AllowFocusedRow="True" AllowSelectByRowClick="True" />
                <SettingsPager PageSize="15"></SettingsPager>
                <SettingsEditing Mode="Inline">
                </SettingsEditing>
                <Settings HorizontalScrollBarMode="Hidden" />

                <SettingsCommandButton>
                     <NewButton ButtonType="Button">
                    </NewButton>
                    <UpdateButton ButtonType="Button">
                    </UpdateButton>
                    <CancelButton ButtonType="Button">
                    </CancelButton>
                    <EditButton ButtonType="Button">
                    </EditButton>
                    <DeleteButton ButtonType="Button"></DeleteButton>
                </SettingsCommandButton>
                <Styles>
                    <Header HorizontalAlign="Center" Font-Size="Small">
                    </Header>
                    <AlternatingRow BackColor="#EDF5FF" Enabled="True">
                    </AlternatingRow>
                    <SelectedRow BackColor="#99CCFF">
                    </SelectedRow>
                    <FocusedRow BackColor="#99CCFF">
                    </FocusedRow>
                    <Row Font-Size="11pt" Font-Names="Calibri">
                    </Row>

                </Styles>
            </dx:ASPxGridView>

            <asp:ObjectDataSource ID="dsClassCodes"
                runat="server"
                DataObjectTypeName="Timesheet.Domain.ClassCode"
                InsertMethod="Add"  DeleteMethod="Delete"
                SelectMethod="GetClassCodes"
                TypeName="Timesheet.Service.IClassCodesService"
                UpdateMethod="Update"
                OnObjectCreating="dsClassCode_ObjectCreating">
                
            </asp:ObjectDataSource>
        </div>
    </div>
</asp:Content>

